/**
 ----------------------
 1.当前文件用于编辑表单
 2.提供表单相关属性
 3. @param xxxFormConfig.current 指向当前选中的数据
 ----------------------
 */
import type {SystemNotice} from '@/api/modules/system/notice/types';
import type {Rule} from 'ant-design-vue/es/form/interface';
import {useAxForm} from '@/utils/common/hooks';

const noticeFormObj: SystemNotice = {
        noticeId: 0 ,
        noticeTitle: "" ,
        noticeType: "" ,
        noticeContent: "" ,
        status: "" ,
        createBy: "" ,
        createTime: null ,
        updateBy: "" ,
        updateTime: null ,
        remark: "" ,
};

// 表格校验
export const noticeRules: Record<string, Rule[]> = {
    noticeTitle: [{required: true, trigger: 'change'}],
    noticeType: [{required: true, trigger: 'change'}],
    noticeContent: [{required: false , trigger: 'change'}],
    status: [{required: false , trigger: 'change'}],
    remark: [{required: false , trigger: 'change'}],
};
export const noticeFormConfig = useAxForm<SystemNotice>(noticeFormObj);
export const noticeFormRef = ref()